// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   TransactionUtil.java

package com.vandagroup.common.msgexchange;

import com.vandagroup.common.bean.BaseBean;
import com.vandagroup.common.bean.EBankFormBean;

// Referenced classes of package com.vandagroup.common.msgexchange:
//            AbstractExchageForm, MsgConfigPO

public class TransactionUtil
{

    public TransactionUtil()
    {
    }

    public static String[] getTransctionInputItem(AbstractExchageForm form)
        throws Exception
    {
        String tranCode = form.getTranCode();
        String sql = "select tranItem from msgconfig where trancode = '" + tranCode + "'";
        MsgConfigPO po = new MsgConfigPO();
        BaseBean baseBeans[] = po.query(sql);
        String resultItem[] = new String[baseBeans.length];
        for(int i = 0; i < baseBeans.length; i++)
            resultItem[i] = (String)baseBeans[i].get("tranItem");

        return resultItem;
    }

    public static String[][] getTransctionInputItem(EBankFormBean form)
        throws Exception
    {
        String tranCode = form.getTransCode();
        String sql = "select tranItem,paramname from msgconfig where trancode = '" + tranCode + "'";
        MsgConfigPO po = new MsgConfigPO();
        BaseBean baseBeans[] = po.query(sql);
        String resultItem[][] = new String[baseBeans.length][2];
        for(int i = 0; i < baseBeans.length; i++)
        {
            resultItem[i][0] = (String)baseBeans[i].get("tranItem");
            resultItem[i][1] = (String)baseBeans[i].get("paramname");
        }

        return resultItem;
    }
}
